package bairui.international.controller.prize.nine;

import com.sh_lianjing.spring.web.controller.enhance.module.*;
import com.sh_lianjing.spring.web.controller.enhance.module.body.*;
import com.sh_lianjing.spring.web.controller.enhance.output.bean.*;
import bairui.international.controller.prize.nine.C_Prize_Nine_Manage_Delete;
import bairui.international.controller.prize.nine.C_Prize_Nine_Manage_Publish;
import bairui.international.controller.prize.nine.C_Prize_Nine_Manage_Up;
import bairui.international.controller.prize.nine.C_Prize_Nine_Manage_Down;
import bairui.international.controller.prize.nine.C_Prize_Nine_Manage_EditAccess;
import bairui.international.controller.prize.nine.C_Prize_Nine_Manage_Finish;

/**
 *
 * Module_Info
 *
 */
class Module_Info{

	
	/**
	 * 信息模块
	 */
	public Module module(
		Module_Info_OutputModel bean, 
		C_Prize_Nine_Manage_Delete.Delete.Operate c_Prize_Nine_Manage_Delete_Delete_Operate
	,	C_Prize_Nine_Manage_Publish.Publish.Operate c_Prize_Nine_Manage_Publish_Publish_Operate
	,	C_Prize_Nine_Manage_Up.Up.Operate c_Prize_Nine_Manage_Up_Up_Operate
	,	C_Prize_Nine_Manage_Down.Down.Operate c_Prize_Nine_Manage_Down_Down_Operate
	,	C_Prize_Nine_Manage_EditAccess.EditAccess.Operate c_Prize_Nine_Manage_EditAccess_EditAccess_Operate
	,	C_Prize_Nine_Manage_Finish.Finish.Operate c_Prize_Nine_Manage_Finish_Finish_Operate
	){
		return
			new Module(
					new ModuleHead("详情")
						.addOperate(
							c_Prize_Nine_Manage_Delete_Delete_Operate
								.defaultComment("删除")
						)
						.addOperate(
							c_Prize_Nine_Manage_Publish_Publish_Operate
								.defaultComment("发布")
						)
						.addOperate(
							c_Prize_Nine_Manage_Up_Up_Operate
								.defaultComment("上架")
						)
						.addOperate(
							c_Prize_Nine_Manage_Down_Down_Operate
								.defaultComment("下架")
						)
						.addOperate(
							c_Prize_Nine_Manage_EditAccess_EditAccess_Operate
								.defaultComment("编辑")
								.defaultTarget(com.sh_lianjing.spring.web.controller.base.operate.OperateTarget.Popup)
						)
						.addOperate(
							c_Prize_Nine_Manage_Finish_Finish_Operate
								.defaultComment("强制结束")
						)
					, 
					new InfoModuleBody(
								bean
							,
							new OutputBeanGroup(
									OutputWay.Vertical, 
									OutputData.info()
								)
						)
				);
	}
	
	/**
	 * 输出信息
	 */
	private static class OutputData {
	
		private static final OutputBean[] info() {
			OutputData outputData = new OutputData();
			return new OutputBean[]{
						outputData.getId(),
						outputData.getTitle(),
						outputData.getFileUrl(),
						outputData.getOrderValue(),
						outputData.getState(),
						outputData.getForceFinishFlag(),
						outputData.getCreateTime(),
						outputData.getPublishTime(),
						outputData.getFinishTime(),
						outputData.getRealFinishTime(),
						outputData.getModifyTime(),
						outputData.getContent(),
				};
		}
	
		OutputBean getId(){
			return new OutputBean("id", "", true, DataDisplay.Hide, DataType.Long, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getTitle(){
			return new OutputBean("title", "标题", true, DataDisplay.Show, DataType.String, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getFileUrl(){
			return new OutputBean("fileUrl", "背景图片", true, DataDisplay.Show, DataType.Img, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getOrderValue(){
			return new OutputBean("orderValue", "排序值", true, DataDisplay.Show, DataType.Integer, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getState(){
			return new OutputBean("state", "状态", true, DataDisplay.Show, DataType.Enum, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getForceFinishFlag(){
			return new OutputBean("forceFinishFlag", "强制结束标志", true, DataDisplay.Show, DataType.Boolean, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getCreateTime(){
			return new OutputBean("createTime", "创建时间", true, DataDisplay.Show, DataType.Date, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getPublishTime(){
			return new OutputBean("publishTime", "发布时间", true, DataDisplay.Show, DataType.Date, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getFinishTime(){
			return new OutputBean("finishTime", "计划时间", true, DataDisplay.Show, DataType.Date, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getRealFinishTime(){
			return new OutputBean("realFinishTime", "实际结束时间", true, DataDisplay.Show, DataType.Date, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getModifyTime(){
			return new OutputBean("modifyTime", "最后修改时间", true, DataDisplay.Show, DataType.Date, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getContent(){
			return new OutputBean("content", "说明", true, DataDisplay.Show, DataType.String, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
	}
	
	
	
	
	/**
	 * 输出模型
	 */
	

}
